<template>
    <div class="chartbox" ref="chartdom"></div>
</template>

<script setup lang="ts">
import { ref, onMounted } from 'vue'
import * as echarts from 'echarts'

const chartdom = ref<any>()
const props: any = defineProps({
    option: Object
})
const chartDomInit = () => {

    var myChart = echarts.init(chartdom.value);
    myChart.setOption(props.option);
}

onMounted(() => {
    chartDomInit()
})
</script>